<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>test</title>
    <link rel="stylesheet" href="element.css">
</head>
<body>
<div id="test">
    <el-row :gutter="20" class="button">
        <el-col :span="2" :offset="2">
            <el-button type="warning" type="text" @click="open()">新建采购单</el-button>
        </el-col>
        <el-col :span="5">
            <a href="<?=base_url('index.php/admin/purchase/exportPurchase')?>"><el-button type="primary" plain>导出采购单</el-button></a>
        </el-col>
    </el-row>

    <el-dialog title="商品信息" :visible.sync="dialogTableVisible" style="overflow: hidden">
        <el-table :data=" gridData">
            <el-table-column property="data" label="商品ID"></el-table-column>
            <el-table-column property="name" label="商品中文名"></el-table-column>
            <el-table-column property="address" label="商品属性"></el-table-column>
            <el-table-column  label="预估值">
                <template slot-scope="scope">
                    <el-input v-model="scope.row.quantity"></el-input>
                </template>
            </el-table-column>
        </el-table>
        <div style="overflow: hidden;margin-top: 20px">
            <el-button type="primary" style="float: right" @click="close()">关闭</el-button>
            <el-button type="primary" style="float: right;margin-right: 30px" @click="updatePurchase()">确认修改</el-button>
        </div>
    </el-dialog>
</div>
<style>
    .el-dropdown {
        vertical-align: top;
    }
    .el-dropdown + .el-dropdown {
        margin-left: 15px;
    }
    .el-icon-arrow-down {
        font-size: 12px;
    }
</style>
</body>
<!-- import Vue before Element -->
<script src="./vue.js"></script>
<script src="./jquery.min.js"></script>
<script src="./element.js"></script>
<script>
    new Vue({
        el:"#test",
         data () {
            // gridData: [
            //     {
            //     date: '2016-05-02',

name :'stash adsfasdfasdfdasfsdafds'


        
            //     name: '王小虎',
            //     address: '上海市普陀区金沙江路 1518 弄'
            // }, {
            //     date: '2016-05-04',
            //     name: '王小虎',
            //     address: '上海市普陀区金沙江路 1518 弄'
            // },{
            //     date: '2016-05-01',
            //     name: '王小虎',
            //     address: '上海市普陀区金沙江路 1518 弄'
            // },{
            //     date: '2016-05-03',
            //     name: '王小虎',
            //     address: '上海市普陀区金沙江路 1518 弄'
            // }]adfasdf
             gridData:[];
        },

                methods: {
                    open(){
                        this.dialogTableVisible = true;
                        this.gridData = this.choose;
                        for(var i=0;i<this.choose.length;i++){
                            this.gridData[i].quantity = '';
                        }
                        324234
                        console.log( this.gridData)
                    },
            }


    })
</script>
</html>